import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // 首页
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/index.vue')
  },

  // 登录
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login.vue')
  },

  // 选择活动
  {
    path: '/select-activity',
    name: 'SelectActivity',
    component: () => import('../views/select-activity.vue'),
    meta: {
      title: '选择活动'
    }
  },

  // 选手评分
  {
    path: '/person-score/:contestId/:contestName',
    name: 'PersonScore',
    component: () => import('../views/person-score.vue'),
    meta: {
      // title: '选手评分'
    }
  },

  // 设置
  {
    path: '/config',
    name: 'Config',
    component: () => import('../views/config.vue'),
    meta: {
      title: '我的'
    }
  },
]

const router = new VueRouter({
  // mode: 'hash',
  routes
})

export default router
